\doxysection{portmacro.\+h}
\hypertarget{portmacro_8h_source}{}\label{portmacro_8h_source}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/Third\_Party/FreeRTOS/Source/portable/GCC/ARM\_CM4F/portmacro.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/Third\_Party/FreeRTOS/Source/portable/GCC/ARM\_CM4F/portmacro.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*}}
\DoxyCodeLine{00002\ \textcolor{comment}{\ *\ FreeRTOS\ Kernel\ V10.3.1}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ Copyright\ (C)\ 2020\ Amazon.com,\ Inc.\ or\ its\ affiliates.\ \ All\ Rights\ Reserved.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ Permission\ is\ hereby\ granted,\ free\ of\ charge,\ to\ any\ person\ obtaining\ a\ copy\ of}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ this\ software\ and\ associated\ documentation\ files\ (the\ "{}Software"{}),\ to\ deal\ in}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ the\ Software\ without\ restriction,\ including\ without\ limitation\ the\ rights\ to}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ use,\ copy,\ modify,\ merge,\ publish,\ distribute,\ sublicense,\ and/or\ sell\ copies\ of}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ the\ Software,\ and\ to\ permit\ persons\ to\ whom\ the\ Software\ is\ furnished\ to\ do\ so,}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ subject\ to\ the\ following\ conditions:}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ The\ above\ copyright\ notice\ and\ this\ permission\ notice\ shall\ be\ included\ in\ all}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ copies\ or\ substantial\ portions\ of\ the\ Software.}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ THE\ SOFTWARE\ IS\ PROVIDED\ "{}AS\ IS"{},\ WITHOUT\ WARRANTY\ OF\ ANY\ KIND,\ EXPRESS\ OR}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ IMPLIED,\ INCLUDING\ BUT\ NOT\ LIMITED\ TO\ THE\ WARRANTIES\ OF\ MERCHANTABILITY,\ FITNESS}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ FOR\ A\ PARTICULAR\ PURPOSE\ AND\ NONINFRINGEMENT.\ IN\ NO\ EVENT\ SHALL\ THE\ AUTHORS\ OR}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ COPYRIGHT\ HOLDERS\ BE\ LIABLE\ FOR\ ANY\ CLAIM,\ DAMAGES\ OR\ OTHER\ LIABILITY,\ WHETHER}}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ IN\ AN\ ACTION\ OF\ CONTRACT,\ TORT\ OR\ OTHERWISE,\ ARISING\ FROM,\ OUT\ OF\ OR\ IN}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ CONNECTION\ WITH\ THE\ SOFTWARE\ OR\ THE\ USE\ OR\ OTHER\ DEALINGS\ IN\ THE\ SOFTWARE.}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ http://www.FreeRTOS.org}}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ http://aws.amazon.com/freertos}}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ 1\ tab\ ==\ 4\ spaces!}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \textcolor{preprocessor}{\#ifndef\ PORTMACRO\_H}}
\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#define\ PORTMACRO\_H}}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ \textcolor{preprocessor}{\#include\ "{}FreeRTOS.h"{}}}
\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#include\ "{}FreeRTOSConfig.h"{}}}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00036\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}\ \{}
\DoxyCodeLine{00037\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{00040\ \textcolor{comment}{\ *\ Port\ specific\ definitions.}}
\DoxyCodeLine{00041\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00042\ \textcolor{comment}{\ *\ The\ settings\ in\ this\ file\ configure\ FreeRTOS\ correctly\ for\ the}}
\DoxyCodeLine{00043\ \textcolor{comment}{\ *\ given\ hardware\ and\ compiler.}}
\DoxyCodeLine{00044\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00045\ \textcolor{comment}{\ *\ These\ settings\ should\ not\ be\ altered.}}
\DoxyCodeLine{00046\ \textcolor{comment}{\ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{00047\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ \textcolor{comment}{/*\ Type\ definitions.\ */}}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#define\ portCHAR\ \ \ \ \ \ \ \ char}}
\DoxyCodeLine{00051\ \textcolor{preprocessor}{\#define\ portFLOAT\ \ \ \ \ \ \ float}}
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#define\ portDOUBLE\ \ \ \ \ \ double}}
\DoxyCodeLine{00053\ \textcolor{preprocessor}{\#define\ portLONG\ \ \ \ \ \ \ \ long}}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#define\ portSHORT\ \ \ \ \ \ \ short}}
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#define\ portSTACK\_TYPE\ \ uint32\_t}}
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#define\ portBASE\_TYPE\ \ \ long}}
\DoxyCodeLine{00057\ }
\DoxyCodeLine{00058\ \textcolor{keyword}{typedef}\ portSTACK\_TYPE\ StackType\_t;}
\DoxyCodeLine{00059\ \textcolor{keyword}{typedef}\ \textcolor{keywordtype}{long}\ BaseType\_t;}
\DoxyCodeLine{00060\ \textcolor{keyword}{typedef}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{long}\ UBaseType\_t;}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{preprocessor}{\#if(\ configUSE\_16\_BIT\_TICKS\ ==\ 1\ )}}
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keyword}{typedef}\ uint16\_t\ TickType\_t;}
\DoxyCodeLine{00064\ \textcolor{preprocessor}{\ \ \ \ \#define\ portMAX\_DELAY\ (\ TickType\_t\ )\ 0xffff}}
\DoxyCodeLine{00065\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{typedef}\ uint32\_t\ TickType\_t;}
\DoxyCodeLine{00067\ \textcolor{preprocessor}{\ \ \ \ \#define\ portMAX\_DELAY\ (\ TickType\_t\ )\ 0xffffffffUL}}
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{comment}{/*\ 32-\/bit\ tick\ type\ on\ a\ 32-\/bit\ architecture,\ so\ reads\ of\ the\ tick\ count\ do}}
\DoxyCodeLine{00070\ \textcolor{comment}{\ \ \ \ not\ need\ to\ be\ guarded\ with\ a\ critical\ section.\ */}}
\DoxyCodeLine{00071\ \textcolor{preprocessor}{\ \ \ \ \#define\ portTICK\_TYPE\_IS\_ATOMIC\ 1}}
\DoxyCodeLine{00072\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00073\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00074\ }
\DoxyCodeLine{00075\ \textcolor{comment}{/*\ Architecture\ specifics.\ */}}
\DoxyCodeLine{00076\ \textcolor{preprocessor}{\#define\ portSTACK\_GROWTH\ \ \ \ \ \ \ \ \ \ \ \ (\ -\/1\ )}}
\DoxyCodeLine{00077\ \textcolor{preprocessor}{\#define\ portTICK\_PERIOD\_MS\ \ \ \ \ \ \ \ \ \ (\ (\ TickType\_t\ )\ 1000\ /\ configTICK\_RATE\_HZ\ )}}
\DoxyCodeLine{00078\ \textcolor{preprocessor}{\#define\ portBYTE\_ALIGNMENT\ \ \ \ \ \ \ \ \ \ 8}}
\DoxyCodeLine{00079\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \textcolor{comment}{/*\ Scheduler\ utilities.\ */}}
\DoxyCodeLine{00082\ \textcolor{preprocessor}{\#define\ portYIELD()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00084\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ Set\ a\ PendSV\ to\ request\ a\ context\ switch.\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00085\ \textcolor{preprocessor}{\ \ \ \ portNVIC\_INT\_CTRL\_REG\ =\ portNVIC\_PENDSVSET\_BIT;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00086\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00087\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ Barriers\ are\ normally\ not\ required\ but\ do\ ensure\ the\ code\ is\ completely\ \ \(\backslash\)}}
\DoxyCodeLine{00088\ \textcolor{comment}{\ \ \ \ within\ the\ specified\ behaviour\ for\ the\ architecture.\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00089\ \textcolor{preprocessor}{\ \ \ \ \_\_asm\ volatile(\ "{}dsb"{}\ :::\ "{}memory"{}\ );\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00090\ \textcolor{preprocessor}{\ \ \ \ \_\_asm\ volatile(\ "{}isb"{}\ );\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00091\ \textcolor{preprocessor}{\}}}
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00093\ \textcolor{preprocessor}{\#define\ portNVIC\_INT\_CTRL\_REG\ \ \ \ \ \ \ (\ *\ (\ (\ volatile\ uint32\_t\ *\ )\ 0xe000ed04\ )\ )}}
\DoxyCodeLine{00094\ \textcolor{preprocessor}{\#define\ portNVIC\_PENDSVSET\_BIT\ \ \ \ \ \ (\ 1UL\ <<\ 28UL\ )}}
\DoxyCodeLine{00095\ \textcolor{preprocessor}{\#define\ portEND\_SWITCHING\_ISR(\ xSwitchRequired\ )\ if(\ xSwitchRequired\ !=\ pdFALSE\ )\ portYIELD()}}
\DoxyCodeLine{00096\ \textcolor{preprocessor}{\#define\ portYIELD\_FROM\_ISR(\ x\ )\ portEND\_SWITCHING\_ISR(\ x\ )}}
\DoxyCodeLine{00097\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00099\ \textcolor{comment}{/*\ Critical\ section\ management.\ */}}
\DoxyCodeLine{00100\ \textcolor{keyword}{extern}\ \textcolor{keywordtype}{void}\ vPortEnterCritical(\ \textcolor{keywordtype}{void}\ );}
\DoxyCodeLine{00101\ \textcolor{keyword}{extern}\ \textcolor{keywordtype}{void}\ vPortExitCritical(\ \textcolor{keywordtype}{void}\ );}
\DoxyCodeLine{00102\ \textcolor{preprocessor}{\#define\ portSET\_INTERRUPT\_MASK\_FROM\_ISR()\ \ \ \ \ \ \ ulPortRaiseBASEPRI()}}
\DoxyCodeLine{00103\ \textcolor{preprocessor}{\#define\ portCLEAR\_INTERRUPT\_MASK\_FROM\_ISR(x)\ \ \ \ vPortSetBASEPRI(x)}}
\DoxyCodeLine{00104\ \textcolor{preprocessor}{\#define\ portDISABLE\_INTERRUPTS()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vPortRaiseBASEPRI()}}
\DoxyCodeLine{00105\ \textcolor{preprocessor}{\#define\ portENABLE\_INTERRUPTS()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vPortSetBASEPRI(0)}}
\DoxyCodeLine{00106\ \textcolor{preprocessor}{\#define\ portENTER\_CRITICAL()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vPortEnterCritical()}}
\DoxyCodeLine{00107\ \textcolor{preprocessor}{\#define\ portEXIT\_CRITICAL()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vPortExitCritical()}}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00109\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00110\ }
\DoxyCodeLine{00111\ \textcolor{comment}{/*\ Task\ function\ macros\ as\ described\ on\ the\ FreeRTOS.org\ WEB\ site.\ \ These\ are}}
\DoxyCodeLine{00112\ \textcolor{comment}{not\ necessary\ for\ to\ use\ this\ port.\ \ They\ are\ defined\ so\ the\ common\ demo\ files}}
\DoxyCodeLine{00113\ \textcolor{comment}{(which\ build\ with\ all\ the\ ports)\ will\ build.\ */}}
\DoxyCodeLine{00114\ \textcolor{preprocessor}{\#define\ portTASK\_FUNCTION\_PROTO(\ vFunction,\ pvParameters\ )\ void\ vFunction(\ void\ *pvParameters\ )}}
\DoxyCodeLine{00115\ \textcolor{preprocessor}{\#define\ portTASK\_FUNCTION(\ vFunction,\ pvParameters\ )\ void\ vFunction(\ void\ *pvParameters\ )}}
\DoxyCodeLine{00116\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00117\ }
\DoxyCodeLine{00118\ \textcolor{comment}{/*\ Tickless\ idle/low\ power\ functionality.\ */}}
\DoxyCodeLine{00119\ \textcolor{preprocessor}{\#ifndef\ portSUPPRESS\_TICKS\_AND\_SLEEP}}
\DoxyCodeLine{00120\ \ \ \ \ \textcolor{keyword}{extern}\ \textcolor{keywordtype}{void}\ vPortSuppressTicksAndSleep(\ TickType\_t\ xExpectedIdleTime\ );}
\DoxyCodeLine{00121\ \textcolor{preprocessor}{\ \ \ \ \#define\ portSUPPRESS\_TICKS\_AND\_SLEEP(\ xExpectedIdleTime\ )\ vPortSuppressTicksAndSleep(\ xExpectedIdleTime\ )}}
\DoxyCodeLine{00122\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00123\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00125\ \textcolor{comment}{/*\ Architecture\ specific\ optimisations.\ */}}
\DoxyCodeLine{00126\ \textcolor{preprocessor}{\#ifndef\ configUSE\_PORT\_OPTIMISED\_TASK\_SELECTION}}
\DoxyCodeLine{00127\ \textcolor{preprocessor}{\ \ \ \ \#define\ configUSE\_PORT\_OPTIMISED\_TASK\_SELECTION\ 1}}
\DoxyCodeLine{00128\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00130\ \textcolor{preprocessor}{\#if\ configUSE\_PORT\_OPTIMISED\_TASK\_SELECTION\ ==\ 1}}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00132\ \ \ \ \ \textcolor{comment}{/*\ Generic\ helper\ function.\ */}}
\DoxyCodeLine{00133\ \ \ \ \ \_\_attribute\_\_(\ (\ always\_inline\ )\ )\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ uint8\_t\ ucPortCountLeadingZeros(\ uint32\_t\ ulBitmap\ )}
\DoxyCodeLine{00134\ \ \ \ \ \{}
\DoxyCodeLine{00135\ \ \ \ \ uint8\_t\ ucReturn;}
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \_\_asm\ \textcolor{keyword}{volatile}\ (\ \textcolor{stringliteral}{"{}clz\ \%0,\ \%1"{}}\ :\ \textcolor{stringliteral}{"{}=r"{}}\ (\ ucReturn\ )\ :\ \textcolor{stringliteral}{"{}r"{}}\ (\ ulBitmap\ )\ :\ \textcolor{stringliteral}{"{}memory"{}}\ );}
\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ucReturn;}
\DoxyCodeLine{00139\ \ \ \ \ \}}
\DoxyCodeLine{00140\ }
\DoxyCodeLine{00141\ \ \ \ \ \textcolor{comment}{/*\ Check\ the\ configuration.\ */}}
\DoxyCodeLine{00142\ \textcolor{preprocessor}{\ \ \ \ \#if(\ configMAX\_PRIORITIES\ >\ 32\ )}}
\DoxyCodeLine{00143\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#error\ configUSE\_PORT\_OPTIMISED\_TASK\_SELECTION\ can\ only\ be\ set\ to\ 1\ when\ configMAX\_PRIORITIES\ is\ less\ than\ or\ equal\ to\ 32.\ \ It\ is\ very\ rare\ that\ a\ system\ requires\ more\ than\ 10\ to\ 15\ difference\ priorities\ as\ tasks\ that\ share\ a\ priority\ will\ time\ slice.}}
\DoxyCodeLine{00144\ \textcolor{preprocessor}{\ \ \ \ \#endif}}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00146\ \ \ \ \ \textcolor{comment}{/*\ Store/clear\ the\ ready\ priorities\ in\ a\ bit\ map.\ */}}
\DoxyCodeLine{00147\ \textcolor{preprocessor}{\ \ \ \ \#define\ portRECORD\_READY\_PRIORITY(\ uxPriority,\ uxReadyPriorities\ )\ (\ uxReadyPriorities\ )\ |=\ (\ 1UL\ <<\ (\ uxPriority\ )\ )}}
\DoxyCodeLine{00148\ \textcolor{preprocessor}{\ \ \ \ \#define\ portRESET\_READY\_PRIORITY(\ uxPriority,\ uxReadyPriorities\ )\ (\ uxReadyPriorities\ )\ \&=\ \string~(\ 1UL\ <<\ (\ uxPriority\ )\ )}}
\DoxyCodeLine{00149\ }
\DoxyCodeLine{00150\ \ \ \ \ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \textcolor{preprocessor}{\ \ \ \ \#define\ portGET\_HIGHEST\_PRIORITY(\ uxTopPriority,\ uxReadyPriorities\ )\ uxTopPriority\ =\ (\ 31UL\ -\/\ (\ uint32\_t\ )\ ucPortCountLeadingZeros(\ (\ uxReadyPriorities\ )\ )\ )}}
\DoxyCodeLine{00153\ }
\DoxyCodeLine{00154\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ configUSE\_PORT\_OPTIMISED\_TASK\_SELECTION\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00156\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00157\ }
\DoxyCodeLine{00158\ \textcolor{preprocessor}{\#ifdef\ configASSERT}}
\DoxyCodeLine{00159\ \ \ \ \ \textcolor{keywordtype}{void}\ vPortValidateInterruptPriority(\ \textcolor{keywordtype}{void}\ );}
\DoxyCodeLine{00160\ \textcolor{preprocessor}{\ \ \ \ \#define\ portASSERT\_IF\_INTERRUPT\_PRIORITY\_INVALID()\ \ vPortValidateInterruptPriority()}}
\DoxyCodeLine{00161\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00163\ \textcolor{comment}{/*\ portNOP()\ is\ not\ required\ by\ this\ port.\ */}}
\DoxyCodeLine{00164\ \textcolor{preprocessor}{\#define\ portNOP()}}
\DoxyCodeLine{00165\ }
\DoxyCodeLine{00166\ \textcolor{preprocessor}{\#define\ portINLINE\ \ \_\_inline}}
\DoxyCodeLine{00167\ }
\DoxyCodeLine{00168\ \textcolor{preprocessor}{\#ifndef\ portFORCE\_INLINE}}
\DoxyCodeLine{00169\ \textcolor{preprocessor}{\ \ \ \ \#define\ portFORCE\_INLINE\ inline\ \_\_attribute\_\_((\ always\_inline))}}
\DoxyCodeLine{00170\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00171\ }
\DoxyCodeLine{00172\ portFORCE\_INLINE\ \textcolor{keyword}{static}\ BaseType\_t\ xPortIsInsideInterrupt(\ \textcolor{keywordtype}{void}\ )}
\DoxyCodeLine{00173\ \{}
\DoxyCodeLine{00174\ uint32\_t\ ulCurrentInterrupt;}
\DoxyCodeLine{00175\ BaseType\_t\ xReturn;}
\DoxyCodeLine{00176\ }
\DoxyCodeLine{00177\ \ \ \ \ \textcolor{comment}{/*\ Obtain\ the\ number\ of\ the\ currently\ executing\ interrupt.\ */}}
\DoxyCodeLine{00178\ \ \ \ \ \_\_asm\ \textcolor{keyword}{volatile}(\ \textcolor{stringliteral}{"{}mrs\ \%0,\ ipsr"{}}\ :\ \textcolor{stringliteral}{"{}=r"{}}(\ ulCurrentInterrupt\ )\ ::\ \textcolor{stringliteral}{"{}memory"{}}\ );}
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00180\ \ \ \ \ \textcolor{keywordflow}{if}(\ ulCurrentInterrupt\ ==\ 0\ )}
\DoxyCodeLine{00181\ \ \ \ \ \{}
\DoxyCodeLine{00182\ \ \ \ \ \ \ \ \ xReturn\ =\ pdFALSE;}
\DoxyCodeLine{00183\ \ \ \ \ \}}
\DoxyCodeLine{00184\ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00185\ \ \ \ \ \{}
\DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ xReturn\ =\ pdTRUE;}
\DoxyCodeLine{00187\ \ \ \ \ \}}
\DoxyCodeLine{00188\ }
\DoxyCodeLine{00189\ \ \ \ \ \textcolor{keywordflow}{return}\ xReturn;}
\DoxyCodeLine{00190\ \}}
\DoxyCodeLine{00191\ }
\DoxyCodeLine{00192\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00193\ }
\DoxyCodeLine{00194\ portFORCE\_INLINE\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ vPortRaiseBASEPRI(\ \textcolor{keywordtype}{void}\ )}
\DoxyCodeLine{00195\ \{}
\DoxyCodeLine{00196\ uint32\_t\ ulNewBASEPRI;}
\DoxyCodeLine{00197\ }
\DoxyCodeLine{00198\ \ \ \ \ \_\_asm\ \textcolor{keyword}{volatile}}
\DoxyCodeLine{00199\ \ \ \ \ (}
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ mov\ \%0,\ \%1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00201\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ msr\ basepri,\ \%0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ isb\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ dsb\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ :\textcolor{stringliteral}{"{}=r"{}}\ (ulNewBASEPRI)\ :\ \textcolor{stringliteral}{"{}i"{}}\ (\ configMAX\_SYSCALL\_INTERRUPT\_PRIORITY\ )\ :\ \textcolor{stringliteral}{"{}memory"{}}}
\DoxyCodeLine{00205\ \ \ \ \ );}
\DoxyCodeLine{00206\ \}}
\DoxyCodeLine{00207\ }
\DoxyCodeLine{00208\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00209\ }
\DoxyCodeLine{00210\ portFORCE\_INLINE\ \textcolor{keyword}{static}\ uint32\_t\ ulPortRaiseBASEPRI(\ \textcolor{keywordtype}{void}\ )}
\DoxyCodeLine{00211\ \{}
\DoxyCodeLine{00212\ uint32\_t\ ulOriginalBASEPRI,\ ulNewBASEPRI;}
\DoxyCodeLine{00213\ }
\DoxyCodeLine{00214\ \ \ \ \ \_\_asm\ \textcolor{keyword}{volatile}}
\DoxyCodeLine{00215\ \ \ \ \ (}
\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ mrs\ \%0,\ basepri\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ mov\ \%1,\ \%2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ msr\ basepri,\ \%1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ isb\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ dsb\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)n"{}}\ \(\backslash\)}
\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ :\textcolor{stringliteral}{"{}=r"{}}\ (ulOriginalBASEPRI),\ \textcolor{stringliteral}{"{}=r"{}}\ (ulNewBASEPRI)\ :\ \textcolor{stringliteral}{"{}i"{}}\ (\ configMAX\_SYSCALL\_INTERRUPT\_PRIORITY\ )\ :\ \textcolor{stringliteral}{"{}memory"{}}}
\DoxyCodeLine{00222\ \ \ \ \ );}
\DoxyCodeLine{00223\ }
\DoxyCodeLine{00224\ \ \ \ \ \textcolor{comment}{/*\ This\ return\ will\ not\ be\ reached\ but\ is\ necessary\ to\ prevent\ compiler}}
\DoxyCodeLine{00225\ \textcolor{comment}{\ \ \ \ warnings.\ */}}
\DoxyCodeLine{00226\ \ \ \ \ \textcolor{keywordflow}{return}\ ulOriginalBASEPRI;}
\DoxyCodeLine{00227\ \}}
\DoxyCodeLine{00228\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00229\ }
\DoxyCodeLine{00230\ portFORCE\_INLINE\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ vPortSetBASEPRI(\ uint32\_t\ ulNewMaskValue\ )}
\DoxyCodeLine{00231\ \{}
\DoxyCodeLine{00232\ \ \ \ \ \_\_asm\ \textcolor{keyword}{volatile}}
\DoxyCodeLine{00233\ \ \ \ \ (}
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ \ \ msr\ basepri,\ \%0\ "{}}\ ::\ \textcolor{stringliteral}{"{}r"{}}\ (\ ulNewMaskValue\ )\ :\ \textcolor{stringliteral}{"{}memory"{}}}
\DoxyCodeLine{00235\ \ \ \ \ );}
\DoxyCodeLine{00236\ \}}
\DoxyCodeLine{00237\ \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{00238\ }
\DoxyCodeLine{00239\ \textcolor{preprocessor}{\#define\ portMEMORY\_BARRIER()\ \_\_asm\ volatile(\ "{}"{}\ :::\ "{}memory"{}\ )}}
\DoxyCodeLine{00240\ }
\DoxyCodeLine{00241\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00242\ \}}
\DoxyCodeLine{00243\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00244\ }
\DoxyCodeLine{00245\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ PORTMACRO\_H\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00246\ }

\end{DoxyCode}
